package com.cn.wanxi.common;

import net.sf.json.JSONArray;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @description:
 * @author: mayafei
 * @time: 2020/3/11 17:55
 */
public class AjaxReturn {
    /**
     * 返回数据给ajax
     * @param message
     * @param response
     */
    public static void informction(Message message, HttpServletResponse response){
        JSONArray jsonArray = JSONArray.fromObject(message);
        try {
            response.getWriter().println(jsonArray);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
